//package com.gui.hospital.listener;
//
//import com.gui.hospital.mapper.HospitalMapper;
//import com.gui.hospital.model.Hospital;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.data.redis.core.RedisTemplate;
//import org.springframework.stereotype.Component;
//import top.javatool.canal.client.annotation.CanalTable;
//import top.javatool.canal.client.handler.EntryHandler;
//
//import java.util.List;
//
///**
// * @author 言叶
// * Date：2025/9/3
// */
////@Component// 注册监听器
////@CanalTable(value = "tb_hospital")
////public class CanalListenerTab implements EntryHandler<Hospital> {
////    @Autowired
////    private RedisTemplate redisTemplate;
////    @Autowired
////    private HospitalMapper hospitalMapper;
////    public void insert(Hospital hospital) {
////        List<Hospital> hospitalList = hospitalMapper.selectList(null);
////        redisTemplate.boundValueOps("registration_hospitalList").set(hospitalList);
////
////    }
////
////    public void update(Hospital before, Hospital hospital) {
////
////        List<Hospital> hospitalList = hospitalMapper.selectList(null);
////        redisTemplate.boundValueOps("registration_hospitalList").set(hospitalList);
////    }
////
////    public void delete(Hospital hospital) {
////        List<Hospital> hospitalList = hospitalMapper.selectList(null);
////        redisTemplate.boundValueOps("registration_hospitalList").set(hospitalList);
////    }
////}
